<?php
/**
 * Created by PhpStorm.
 * User: chenxiongde
 * Date: 17/5/1
 * Time: 上午10:28
 */
class Log{
    static public   function  write($msg,$level='ERROR',$type=3,$dist=null){
        if(!config('SAVE_LOG')) return ;
        if(is_null($dist)){
            $dist = LOG_PATH.'/'.date('Ymd').'.log';

        }
        is_dir(LOG_PATH) && error_log("[TIME]:".date('Y-m-d H:i:s')."---{$level}---"."{$msg}\r\n",$type,$dist);

    }
}
?>